<html>
    <body>
        <span id="opacity" style="transition-duration: 2s;">opacity</span>
        <script>
          document.getElementById('opacity').addEventListener('click', function(event) {
            event.target.style.opacity = 0
          })
        </script>
    </body>
</html>
